package com.spring.config;

import com.spring.dao.BookDao;
import org.springframework.context.annotation.*;

/**
 * Description:
 *
 * @author lijie
 * @create 2019-01-16 21:03
 * Update by lijie 2019-01-16 21:03
 */
@Configuration
@ComponentScan({"com.spring.controller","com.spring.dao","com.spring.service"})
public class MainConfigAutowire {
    @Primary
    @Bean("bookDao2")
    public BookDao bookDao(){
        BookDao bookDao = new BookDao();
        bookDao.setLabel("2");
        return bookDao;
    }

}
